inspector: Add combobox popups to the tree
authorMatthias Clasen <mclasen@redhat.com>
Tue, 10 Jun 2014 12:53:31 +0000 (08:53 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 10 Jun 2014 12:54:12 +0000 (08:54 -0400)
gtk/inspector/widget-tree.c

index 774b0c50543b9006cd5a06f2740d9330cfb71179..6ecd28f9efb5e952d9b1f747c861be64f794df78 100644 (file)
@@ -25,6 +25,7 @@
 #include "prop-list.h"
 #include "widget-tree.h"
 #include "gtkwidgetprivate.h"
+#include "gtkcomboboxprivate.h"
 #include <string.h>
 
 enum
@@ -343,6 +344,15 @@ gtk_inspector_widget_tree_append_object (GtkInspectorWidgetTree *wt,
         gtk_inspector_widget_tree_append_object (wt, G_OBJECT (submenu), &iter, "submenu");
     }
 
+  if (GTK_IS_COMBO_BOX (object))
+    {
+      GtkWidget *popup;
+
+      popup = gtk_combo_box_get_popup (GTK_COMBO_BOX (object));
+      if (popup)
+        gtk_inspector_widget_tree_append_object (wt, G_OBJECT (popup), &iter, "popup");
+    }
+
   if (GTK_IS_TREE_VIEW (object))
     {
       gint n_columns, i;